
#ifndef _CONTRACT_ASSERT_H_
#define _CONTRACT_ASSERT_H_

#ifdef __cplusplus
extern "C" {
#endif
/** NASSERT macro disables all contract validations
 * (assertions, preconditions, postconditions, and invariants).
 */

                  /* callback invoked in case of assertion failure */
#ifndef NASSERT 
                  /* callback invoked in case of assertion failure */
#include <assert.h>

#define ASSERT(test_)	if(!(test_))do{}while(1)

#else                                           /* #ifndef NASSERT */

#define ASSERT(test_)    

#endif

#define REQUIRE(test_)   ASSERT(test_)
#define ENSURE(test_)    ASSERT(test_)
#define INVARIANT(test_) ASSERT(test_)
#define ALLEGE(test_)    ASSERT(test_)


#ifdef __cplusplus
}
#endif

#endif/*_DBC_ASSERT_H_*/

